package lanqiaoDemo2;

import java.util.ArrayDeque;
import java.util.Arrays;
import java.util.Queue;
import java.util.Scanner;

/**
 * @Author liangzai
 * @Description:
 */
public class Main {
    //蓝桥派对
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int[][] arr = new int[n][2];
        int[] nums = new int[n];
        for (int i = 0; i < n; i++) {
            arr[i][0] = scanner.nextInt();
            arr[i][1] = scanner.nextInt();
        }
        for (int i = 0; i < n; i++) {
            for (int j = i+1; j < n; j++) {
                if(arr[i][1]<arr[j][0] || arr[i][0]>arr[j][1]){
                    continue;
                }else {
                    nums[i]++;
                    nums[j]++;
                }
            }
        }
        for (int i = 0; i < n; i++) {
            System.out.println(nums[i]);
        }
    }

    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        long[] nums = new long[n];
        long sum = 0;
        for (int i = 0; i < n; i++) {
            nums[i] = scanner.nextLong();
        }
        Arrays.sort(nums);
        boolean flag = false;
        Queue<Long> queue = new ArrayDeque<>(n);
        for (int i = n-1; i >= 0; i--) {
            if(!queue.isEmpty() && queue.peek()/2>=nums[i]){
                queue.poll();
            }else {
                if (!flag) {
                    sum += nums[i];
                    flag = true;
                }else {
                    sum += nums[i];
                    queue.add(nums[i]);
                    flag = false;
                }
            }
        }
        System.out.println(sum);
    }

    //买二赠一
    public static void main2(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        long[] nums = new long[n];
        long sum = 0;
        for (int i = 0; i < n; i++) {
            nums[i] = scanner.nextLong();
        }
        Arrays.sort(nums);
        Queue<Long> queue1 = new ArrayDeque<>(n);
        Queue<Long> queue2 = new ArrayDeque<>(n);
        for (int i = n-1; i >=0 ; i--) {
            queue1.add(nums[i]);
        }
        while(!queue1.isEmpty() || !queue2.isEmpty()){
            if(queue2.isEmpty()){
                while(!queue1.isEmpty()){
                    if(queue1.size()<2){
                        if(queue2.isEmpty()){
                            sum += queue1.poll();
                        }else {
                            queue2.add(queue1.poll());
                        }
                    }else {
                        sum += queue1.poll();
                        long key = queue1.poll();
                        sum += key;
                        key /= 2;
                        while(!queue1.isEmpty()){
                            if(queue1.peek()<=key){
                                queue1.poll();
                                while(!queue1.isEmpty()){
                                    queue2.add(queue1.poll());
                                }
                            }else {
                                queue2.add(queue1.poll());
                            }
                        }
                    }
                }
            }
            if(queue1.isEmpty()){
                while(!queue2.isEmpty()){
                    if(queue2.size()<2){
                        if(queue1.isEmpty()){
                            sum += queue2.poll();
                        }else {
                            queue1.add(queue2.poll());
                        }
                    }else {
                        sum += queue2.poll();
                        long key = queue2.poll();
                        sum += key;
                        key /= 2;
                        while(!queue2.isEmpty()){
                            if(queue2.peek()<=key){
                                queue2.poll();
                                while(!queue2.isEmpty()){
                                    queue1.add(queue2.poll());
                                }
                            }else {
                                queue1.add(queue2.poll());
                            }
                        }
                    }
                }
            }
        }
        System.out.println(sum);
    }

    public static void main1(String[] args) {
        Queue<Long> queue = new ArrayDeque<>(10);
        queue.add(12l);
        System.out.println(queue.poll()+queue.poll());
    }
}
